﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="NASA.BeAMartian.Views.MapRoom"
	xmlns:local="clr-namespace:NASA.BeAMartian.Views"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	SupportedOrientations="Portrait" Orientation="Portrait"
	xmlns:commonControls="clr-namespace:NASA.BeAMartian.Controls"
	shell:SystemTray.IsVisible="False" Margin="0,1,0,-1">
		<phone:PhoneApplicationPage.Resources>

        <Style x:Key="VideoPlayButtonStyle" TargetType="commonControls:ImageButton">
            <Setter Property="Width" Value="60"/>
            <Setter Property="Height" Value="69"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="commonControls:ImageButton">
                        <Grid x:Name="RootElement">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ImageMouseOver" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0.75"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image x:Name="ImageNormal" Source="/NASA.BeAMartian;Component/Assets/Images/image-Play-enabled.png" Stretch="None"/>
                            <Image x:Name="ImageMouseOver" Source="/NASA.BeAMartian;Component/Assets/Images/image-Play-rollover.png" Stretch="None" Visibility="Collapsed"/>
                            <Rectangle x:Name="FocusVisualElement" Stroke="{StaticResource ForegroundColorFiveBrush}" StrokeThickness="1" Opacity="0.0" Margin="17,23,17,23" RadiusX="2" RadiusY="2"/>

                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Name="sbFadeInIntro">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
		</phone:PhoneApplicationPage.Resources>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="{x:Null}">
		<!--Pivot Control-->
		<Image Source="/NASA.BeAMartian;component/Assets/Images/blk.png" Stretch="Fill"/>
        <Image Source="/NASA.BeAMartian;component/Assets/Images/050223_mars.jpg" Stretch="Fill" Opacity="0.4"/>
		<!--Pivot Control-->
		<controls:Pivot Title="SELECT AN ACTIVITY" x:Name="pvt">
			<!--Pivot item one-->
			<controls:PivotItem Header="intro">
				<Grid>
					<ProgressBar x:Name="pbIntro" IsIndeterminate="True" Height="17" Margin="-16,169,-15,0" VerticalAlignment="Top" Background="#FF4BFF3C" Foreground="#FF4BFF3C"/>
					<Grid x:Name="grid" Opacity="0">
						<Image ImageOpened="Image_ImageOpened" Source="http://beamdownload.blob.core.windows.net/media/WP7/participate.png" VerticalAlignment="Top" Margin="0,126,0,0"/>
						<TextBlock Height="40" Margin="114,1,104,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#FFFFAF00" FontFamily="Segoe WP Light" FontSize="32"><Run Text="H E L P     M A P"/><LineBreak/></TextBlock>
						<TextBlock Height="97" Margin="114,25,41,0" TextWrapping="Wrap" Text="M A R S" VerticalAlignment="Top" Foreground="#FFFFAF00" FontSize="64"/>
						<commonControls:ImageButton x:Name="VideoImageButton01" Opacity="0.82" Visibility="Visible" RenderTransformOrigin="0.5,0.5" 
							Style="{StaticResource VideoPlayButtonStyle}" Click="ImageButton_Click" 
							Tag="http://beamdownload.blob.core.windows.net/media/Map_A_World_H264_cc.wmv" Margin="184,0,212,216" 
                                                    Height="69" VerticalAlignment="Bottom" Width="Auto">
							<commonControls:ImageButton.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform/>
									<RotateTransform/>
									<TranslateTransform/>
								</TransformGroup>
							</commonControls:ImageButton.RenderTransform>
						</commonControls:ImageButton>
					</Grid>
				</Grid>
			</controls:PivotItem>

 			<!--Pivot item two-->
            <controls:PivotItem Header="tag mars">
                <local:StartRoverTagging/>
            </controls:PivotItem>

 			<!--Pivot item two-->
			<controls:PivotItem Header="count craters">
				<local:StartCountingCraters/>
			</controls:PivotItem>
		</controls:Pivot>
        <Grid Visibility="Collapsed" x:Name="grdTaskContainer"/>
	</Grid>
</phone:PhoneApplicationPage>